<form action="{:url()}" method="post" class="form_single">
    <div class="box">
      <div class="box-body">
        <div class="row">
          <div class="col-md-6">
            <div class="form-group">
              <label>名称</label>
              <span>（系统后台显示套餐名称）</span>
              <input class="form-control" name="name" placeholder="请输入套餐名称" value="{$info['name']|default=''}" type="text">
            </div>
          </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>报价</label>
                    <span>（套餐报价）</span>
                    <input class="form-control" name="money" placeholder="请输入套餐报价" value="{$info['money']|default=''}" type="number">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>有效期</label>
                    <span>（单位“月”）</span>
                    <input class="form-control" name="year" placeholder="请输入套餐有效期" value="{$info['year']|default=''}" type="number">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>发布区域</label>
                    （<span style="color:green" id="address">{$info['address']|default='无'}</span>）
                    <input class="form-control" name="address" placeholder="请输入地区" value="{$info['address']|default=''}" type="text">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>职位发布权限</label>
                    <span>（权限数量）</span>
                    <input class="form-control" name="workNum" placeholder="请输入数量" value="{$info['workNum']|default=''}" type="number">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>简历沟通权限</label>
                    <span>（权限数量）</span>
                    <input class="form-control" name="resumeNum" placeholder="请输入数量" value="{$info['resumeNum']|default=''}" type="text">
                </div>
            </div>
          <div class="col-md-6">
            <div class="form-group">
              <label>排序值</label>
              <span>（用户套餐的排序，默认为 0）</span>
              <input class="form-control" name="sort" placeholder="请输入套餐排序值" value="{$info['sort']|default='0'}" type="text">
            </div>
          </div>
        </div>
      </div>
      <div class="box-footer">
          
        <input type="hidden" name="id" value="{$info['id']|default='0'}"/>
        
        <button  type="submit" class="btn ladda-button ajax-post" data-style="slide-up" target-form="form_single">
            <span class="ladda-label"><i class="fa fa-send"></i> 确 定</span>
        </button>

        <a class="btn" href="javascript:history.back(-1)"><i class="fa fa-history"></i> 返 回</a>
        
      </div>
    </div>
</form>
<script>
    $(function(){
        $("input[name='address']").blur(function(){
            var addresss=$(this).val();
            $.post("{:url('user/checkAddress')}",{addresss:addresss},function(data){
                if(data.code == 0){
                    $("#address").html(data.msg);
                }else{
                    layer.msg(data.msg);
                    $("#address").html('无');
                }
            },'json')
        })
    })

</script>